# coding: utf-8

"""
    用户信息模块，URL
"""

from django.urls import path, include
from rest_framework.routers import DefaultRouter
from homepage.views import show_all
from users.views import *

router = DefaultRouter()

# 这里的路径, 前后都不要加 / , 否则会匹配不到
router.register(r"register/check_msg", RegisterViewSet)
router.register(r"modify_personal_profile", PersonalProfileView)

# url请求分类列表
urlpatterns = [
    path("show_login_page/", ShowLogin.as_view()),
    path("show_login_page/login/", Login.as_view()),
    path("register/", Register.as_view()),
    path("register/add_user/", Register.as_view()),
    path("activate_mailbox/", EmailView.as_view()),
    path("register/phone_vcode/", PhoneVerificationCodeView.as_view()),
    path("", include(router.urls)),
    path("login_out/", show_all),
    path("details/", UserCenter.as_view()),
    path("my_favorite/", MyFavoriteView.as_view()),
    path("my_order/", MyOrder.as_view()),
    path("email_activation_page", waiting_for_email_activation),
    path("check_email_activation", check_email_activation),
    path("edit_userinfo", edit_userinfo),
]
